import request from '@/utils/request'

// 获取企业列表
export function getListByName(data) {
  return request({
    url: '/api/companyInfo/listByName',
    method: 'get',
    params: data
  })
}

// 通过ID获取企业信息
export function getDateById(id) {
  return request({
    url: '/api/companyInfo/getById/' + id,
    method: 'get'
  })
}

// 通过邀请码获取企业信息
export function getCode(code) {
  return request({
    url: '/api/companyInfo/getCompanyInfoByInviteCode/' + code,
    method: 'get'
  })
}

// 保存企业信息
export function addCompany(data) {
  return request({
    url: '/api/companyInfo/addCompany',
    method: 'post',
    data: data
  })
}

// 获取企业订单总体订单统计
export function manageCompanyOrderTotalInfo(data) {
  return request({
    url: '/api/orderEmployeeSituation/manageCompanyOrderTotalInfo',
    method: 'get',
    params: data
  })
}

// 企业总体订单趋势统计
export function manageCompanyOrderTotalTrend(data) {
  return request({
    url: '/api/orderEmployeeSituation/manageCompanyOrderTotalTrend',
    method: 'get',
    params: data
  })
}

